home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / pmake / makedepend.mk < prev    next >
Encoding:
Text File  |  1991-11-20  |  936 b   |  28 lines

  1. #
  2. # Makefile of rules for creating dependencies using the 'makedepend'
  3. # program. DEPFILE contains the name of the file wherein the dependencies
  4. # should be placed. This defaults to 'dependencies.mk' in the local directory.
  5. # It may, however, be changed to 'Makefile' without harm.
  6. #
  7. # If you want the dependencies to include the full pathname of each include
  8. # file, you must specify the '-p' flag in the DEPFLAGS variable.
  9. #
  10. # If the SRCS variable is defined, the 'depend' target will be set up
  11. # to create dependencies for all files in that variable.
  12. #
  13. # The MAKEDEPEND rule will pass all -I and -D flags given in the CFLAGS
  14. # variable to makedepend. Usage is like this:
  15. #
  16. # depend : $(LIBSRCS) $(PROGSRC) MAKEDEPEND
  17. DEPFLAGS    ?=
  18.  
  19. #if defined(SRCS) && !defined(NODEPEND)
  20. depend        : $(SRCS) MAKEDEPEND .NOTMAIN
  21. #endif
  22.  
  23. DEPFILE        ?= dependencies.mk
  24.  
  25. MAKEDEPEND    : .USE
  26.     makedepend $(CFLAGS:M-[ID]*) $(DEPFLAGS) -f $(DEPFILE) $(.ALLSRC)
  27.